\(\int x \sqrt {a+b x} (A+B x) \, dx\) [390]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 67 \[ \int x \sqrt {a+b x} (A+B x) \, dx=-\frac {2 a (A b-a B) (a+b x)^{3/2}}{3 b^3}+\frac {2 (A b-2 a B) (a+b x)^{5/2}}{5 b^3}+\frac {2 B (a+b x)^{7/2}}{7 b^3} \]

[Out]

-2/3*a*(A*b-B*a)*(b*x+a)^(3/2)/b^3+2/5*(A*b-2*B*a)*(b*x+a)^(5/2)/b^3+2/7*B*(b*x+a)^(7/2)/b^3

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {78} \[ \int x \sqrt {a+b x} (A+B x) \, dx=\frac {2 (a+b x)^{5/2} (A b-2 a B)}{5 b^3}-\frac {2 a (a+b x)^{3/2} (A b-a B)}{3 b^3}+\frac {2 B (a+b x)^{7/2}}{7 b^3} \]

[In]

Int[x*Sqrt[a + b*x]*(A + B*x),x]

[Out]

(-2*a*(A*b - a*B)*(a + b*x)^(3/2))/(3*b^3) + (2*(A*b - 2*a*B)*(a + b*x)^(5/2))/(5*b^3) + (2*B*(a + b*x)^(7/2))
/(7*b^3)

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a (-A b+a B) \sqrt {a+b x}}{b^2}+\frac {(A b-2 a B) (a+b x)^{3/2}}{b^2}+\frac {B (a+b x)^{5/2}}{b^2}\right ) \, dx \\ & = -\frac {2 a (A b-a B) (a+b x)^{3/2}}{3 b^3}+\frac {2 (A b-2 a B) (a+b x)^{5/2}}{5 b^3}+\frac {2 B (a+b x)^{7/2}}{7 b^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.73 \[ \int x \sqrt {a+b x} (A+B x) \, dx=\frac {2 (a+b x)^{3/2} \left (8 a^2 B+3 b^2 x (7 A+5 B x)-2 a b (7 A+6 B x)\right )}{105 b^3} \]

[In]

Integrate[x*Sqrt[a + b*x]*(A + B*x),x]

[Out]

(2*(a + b*x)^(3/2)*(8*a^2*B + 3*b^2*x*(7*A + 5*B*x) - 2*a*b*(7*A + 6*B*x)))/(105*b^3)

Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.61

method result size
pseudoelliptic \(-\frac {4 \left (-\frac {3 x \left (\frac {5 B x}{7}+A \right ) b^{2}}{2}+a \left (\frac {6 B x}{7}+A \right ) b -\frac {4 a^{2} B}{7}\right ) \left (b x +a \right )^{\frac {3}{2}}}{15 b^{3}}\) \(41\)
gosper \(-\frac {2 \left (b x +a \right )^{\frac {3}{2}} \left (-15 b^{2} B \,x^{2}-21 A \,b^{2} x +12 B a b x +14 a b A -8 a^{2} B \right )}{105 b^{3}}\) \(47\)
derivativedivides \(\frac {\frac {2 B \left (b x +a \right )^{\frac {7}{2}}}{7}+\frac {2 \left (A b -2 B a \right ) \left (b x +a \right )^{\frac {5}{2}}}{5}-\frac {2 a \left (A b -B a \right ) \left (b x +a \right )^{\frac {3}{2}}}{3}}{b^{3}}\) \(52\)
default \(\frac {\frac {2 B \left (b x +a \right )^{\frac {7}{2}}}{7}+\frac {2 \left (A b -2 B a \right ) \left (b x +a \right )^{\frac {5}{2}}}{5}-\frac {2 a \left (A b -B a \right ) \left (b x +a \right )^{\frac {3}{2}}}{3}}{b^{3}}\) \(52\)
trager \(-\frac {2 \left (-15 b^{3} B \,x^{3}-21 A \,b^{3} x^{2}-3 B a \,b^{2} x^{2}-7 a \,b^{2} A x +4 a^{2} b B x +14 a^{2} b A -8 a^{3} B \right ) \sqrt {b x +a}}{105 b^{3}}\) \(71\)
risch \(-\frac {2 \left (-15 b^{3} B \,x^{3}-21 A \,b^{3} x^{2}-3 B a \,b^{2} x^{2}-7 a \,b^{2} A x +4 a^{2} b B x +14 a^{2} b A -8 a^{3} B \right ) \sqrt {b x +a}}{105 b^{3}}\) \(71\)

[In]

int(x*(B*x+A)*(b*x+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-4/15*(-3/2*x*(5/7*B*x+A)*b^2+a*(6/7*B*x+A)*b-4/7*a^2*B)*(b*x+a)^(3/2)/b^3

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.06 \[ \int x \sqrt {a+b x} (A+B x) \, dx=\frac {2 \, {\left (15 \, B b^{3} x^{3} + 8 \, B a^{3} - 14 \, A a^{2} b + 3 \, {\left (B a b^{2} + 7 \, A b^{3}\right )} x^{2} - {\left (4 \, B a^{2} b - 7 \, A a b^{2}\right )} x\right )} \sqrt {b x + a}}{105 \, b^{3}} \]

[In]

integrate(x*(B*x+A)*(b*x+a)^(1/2),x, algorithm="fricas")

[Out]

2/105*(15*B*b^3*x^3 + 8*B*a^3 - 14*A*a^2*b + 3*(B*a*b^2 + 7*A*b^3)*x^2 - (4*B*a^2*b - 7*A*a*b^2)*x)*sqrt(b*x +
 a)/b^3

Sympy [A] (verification not implemented)

Time = 0.61 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.22 \[ \int x \sqrt {a+b x} (A+B x) \, dx=\begin {cases} \frac {2 \left (\frac {B \left (a + b x\right )^{\frac {7}{2}}}{7 b} + \frac {\left (a + b x\right )^{\frac {5}{2}} \left (A b - 2 B a\right )}{5 b} + \frac {\left (a + b x\right )^{\frac {3}{2}} \left (- A a b + B a^{2}\right )}{3 b}\right )}{b^{2}} & \text {for}\: b \neq 0 \\\sqrt {a} \left (\frac {A x^{2}}{2} + \frac {B x^{3}}{3}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate(x*(B*x+A)*(b*x+a)**(1/2),x)

[Out]

Piecewise((2*(B*(a + b*x)**(7/2)/(7*b) + (a + b*x)**(5/2)*(A*b - 2*B*a)/(5*b) + (a + b*x)**(3/2)*(-A*a*b + B*a
**2)/(3*b))/b**2, Ne(b, 0)), (sqrt(a)*(A*x**2/2 + B*x**3/3), True))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.81 \[ \int x \sqrt {a+b x} (A+B x) \, dx=\frac {2 \, {\left (15 \, {\left (b x + a\right )}^{\frac {7}{2}} B - 21 \, {\left (2 \, B a - A b\right )} {\left (b x + a\right )}^{\frac {5}{2}} + 35 \, {\left (B a^{2} - A a b\right )} {\left (b x + a\right )}^{\frac {3}{2}}\right )}}{105 \, b^{3}} \]

[In]

integrate(x*(B*x+A)*(b*x+a)^(1/2),x, algorithm="maxima")

[Out]

2/105*(15*(b*x + a)^(7/2)*B - 21*(2*B*a - A*b)*(b*x + a)^(5/2) + 35*(B*a^2 - A*a*b)*(b*x + a)^(3/2))/b^3

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (56) = 112\).

Time = 0.29 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.36 \[ \int x \sqrt {a+b x} (A+B x) \, dx=\frac {2 \, {\left (\frac {35 \, {\left ({\left (b x + a\right )}^{\frac {3}{2}} - 3 \, \sqrt {b x + a} a\right )} A a}{b} + \frac {7 \, {\left (3 \, {\left (b x + a\right )}^{\frac {5}{2}} - 10 \, {\left (b x + a\right )}^{\frac {3}{2}} a + 15 \, \sqrt {b x + a} a^{2}\right )} B a}{b^{2}} + \frac {7 \, {\left (3 \, {\left (b x + a\right )}^{\frac {5}{2}} - 10 \, {\left (b x + a\right )}^{\frac {3}{2}} a + 15 \, \sqrt {b x + a} a^{2}\right )} A}{b} + \frac {3 \, {\left (5 \, {\left (b x + a\right )}^{\frac {7}{2}} - 21 \, {\left (b x + a\right )}^{\frac {5}{2}} a + 35 \, {\left (b x + a\right )}^{\frac {3}{2}} a^{2} - 35 \, \sqrt {b x + a} a^{3}\right )} B}{b^{2}}\right )}}{105 \, b} \]

[In]

integrate(x*(B*x+A)*(b*x+a)^(1/2),x, algorithm="giac")

[Out]

2/105*(35*((b*x + a)^(3/2) - 3*sqrt(b*x + a)*a)*A*a/b + 7*(3*(b*x + a)^(5/2) - 10*(b*x + a)^(3/2)*a + 15*sqrt(
b*x + a)*a^2)*B*a/b^2 + 7*(3*(b*x + a)^(5/2) - 10*(b*x + a)^(3/2)*a + 15*sqrt(b*x + a)*a^2)*A/b + 3*(5*(b*x +
a)^(7/2) - 21*(b*x + a)^(5/2)*a + 35*(b*x + a)^(3/2)*a^2 - 35*sqrt(b*x + a)*a^3)*B/b^2)/b

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.78 \[ \int x \sqrt {a+b x} (A+B x) \, dx=\frac {2\,{\left (a+b\,x\right )}^{3/2}\,\left (35\,B\,a^2+15\,B\,{\left (a+b\,x\right )}^2-35\,A\,a\,b+21\,A\,b\,\left (a+b\,x\right )-42\,B\,a\,\left (a+b\,x\right )\right )}{105\,b^3} \]

[In]

int(x*(A + B*x)*(a + b*x)^(1/2),x)

[Out]

(2*(a + b*x)^(3/2)*(35*B*a^2 + 15*B*(a + b*x)^2 - 35*A*a*b + 21*A*b*(a + b*x) - 42*B*a*(a + b*x)))/(105*b^3)